const Service=require('egg').Service;

class HomeService extends Service{
    async find(uid){
        const user=await this.app.mysql.get('member',{id:uid});
        return user;
    }
    async findByName(name){
        const result=await this.app.mysql.get('member',{name:name});
        return result;
    }
    async update(data){
        const fundorder=await this.app.mysql.get('member',{id:data.id});
        if(!fundorder){
            return '没有该数据';
        }
        const result=await this.app.mysql.update('member',data);
        return result;
    }
}
module.exports=HomeService;